package com.yunhai.model.entity.tms;

import com.baomidou.mybatisplus.annotation.*;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;
import java.math.BigDecimal;
import java.time.LocalDateTime;

@ApiModel(value = "TmsStore", description = "门店基础信息实体")
@TableName("tms_store")
@Data
@Accessors(chain = true)
public class Store {

    @ApiModelProperty(value = "门店编号(主键)", example = "100001")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty(value = "门店编号(业务唯一)", example = "STORE_2023_001")
    private String storeCode;

    @ApiModelProperty(value = "外部门店编号", example = "EXT_STORE_001")
    private String externalStoreCode;

    @ApiModelProperty(value = "门店短名称", required = true, example = "北京朝阳门店")
    private String shortName;

    @ApiModelProperty(value = "门店全称", required = true, example = "北京市朝阳区朝阳北路旗舰店")
    private String fullName;

    @ApiModelProperty(value = "所属门店组ID", required = true, example = "101")
    private Integer groupId;

    @ApiModelProperty(value = "门店类型ID", required = true, example = "2")
    private Integer typeId;

    @ApiModelProperty(value = "所在省份", example = "北京市")
    private String provinceName;

    @ApiModelProperty(value = "所在城市", example = "北京市")
    private String cityName;

    @ApiModelProperty(value = "行政区划代码", example = "110105")
    private String areaCode;

    @ApiModelProperty(value = "详细地址", example = "朝阳区朝阳北路99号")
    private String address;

    @ApiModelProperty(value = "经度", example = "116.498729")
    private BigDecimal longitude;

    @ApiModelProperty(value = "纬度", example = "39.917723")
    private BigDecimal latitude;

    @ApiModelProperty(value = "创建人ID", hidden = true)
    @TableField(fill = FieldFill.INSERT)
    private Long createdBy;

    @ApiModelProperty(value = "更新人ID", hidden = true)
    @TableField(fill = FieldFill.UPDATE)
    private Long updatedBy;

    @ApiModelProperty(value = "创建时间", hidden = true)
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createdAt;

    @ApiModelProperty(value = "更新时间", hidden = true)
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updatedAt;

    @ApiModelProperty(value = "删除标记", hidden = true)
    @TableLogic
    private Integer isDeleted;
}